
//
//  AddrSearchCell.m
//  UESTCPioneer
//
//  Created by Apple on 14-11-16.
//  Copyright (c) 2014年 Sway. All rights reserved.
//

#import "AddrSearchCell.h"

@implementation AddrSearchCell

-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{

    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self addSubview:_headImage];
        [self addSubview:_nameLabel];
    }
    return self;
}

-(UIImageView *)imageView{
    if (!_headImage) {
        _headImage = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 40, 40)];
    }
    return _headImage;
}

-(UILabel *)nameLabel{

    if (!_nameLabel) {
        CGFloat lx = CGRectGetMaxX(_headImage.frame);
        CGFloat ly = (self.frame.size.height - 20) / 2;
        _nameLabel= [[UILabel alloc] initWithFrame:CGRectMake(lx, ly, 100, 20)];
    }
    return _nameLabel;
}

@end


